package com.migration.model.newdb;

import jakarta.persistence.*;
import lombok.Data;
import java.io.Serializable;

/**
 * 化学品信息表 实体类
 * 表名：risk_chemicals
 * 自动生成的实体类
 */
@Data
@Entity
@Table(name = "risk_chemicals")
public class RiskChemicals implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 主键
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false)
    private Long id;
    
    /**
     * 化学品编码
     */
    @Column(name = "chemical_code", nullable = false, length = 16)
    private String chemicalCode;
    
    /**
     * 知识库化学品主键（兼容老数据）
     */
    @Column(name = "material_source_id")
    private Long materialSourceId;
    
    /**
     * 中文名
     */
    @Column(name = "c_name", length = 256)
    private String cName;
    
    /**
     * 物料号
     */
    @Column(name = "material_num", length = 32)
    private String materialNum;
    
    /**
     * CAS号
     */
    @Column(name = "cas_num", length = 256)
    private String casNum;
    
    /**
     * 化学品用途
     */
    @Column(name = "chemical_use", length = 512)
    private String chemicalUse;
    
    /**
     * 租户主键
     * 默认值: 1
     */
    @Column(name = "tenant_id")
    private Integer tenantId;
    
    /**
     * 是否系统（0、否 1、是）
     * 默认值: 1
     */
    @Column(name = "is_system")
    private Byte isSystem;
    
    /**
     * 是否删除（0、否 1、是）
     * 默认值: 0
     */
    @Column(name = "is_del")
    private Byte isDel;
    
    /**
     * 创建时间
     */
    @Column(name = "create_time", length = 20)
    private String createTime;
    
    /**
     * 创建者
     */
    @Column(name = "create_by")
    private Long createBy;
    
    /**
     * 更新时间
     */
    @Column(name = "update_time", length = 20)
    private String updateTime;
    
    /**
     * 更新者
     */
    @Column(name = "update_by")
    private Long updateBy;
    
    @Override
    public String toString() {
        return "RiskChemicals{" +
            "id=" + id +
            ", chemicalCode=" + chemicalCode +
            ", materialSourceId=" + materialSourceId +
            ", cName=" + cName +
            ", materialNum=" + materialNum +
            ", casNum=" + casNum +
            ", chemicalUse=" + chemicalUse +
            ", tenantId=" + tenantId +
            ", isSystem=" + isSystem +
            ", isDel=" + isDel +
            ", createTime=" + createTime +
            ", createBy=" + createBy +
            ", updateTime=" + updateTime +
            ", updateBy=" + updateBy +
        '}';
    }
} 